<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>车辆基础资料</title>
<link href="<%=path%>/CSS/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp"%>
<script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">

 /* function submit(deleteId){
	  $(".sure").click(function(){
	  $(".tip").fadeOut(100);
	  location='deleteCarByFid?deleteId='+deleteId+'';
	  })
	  
	  $(".cancel").click(function(){
		  $(".tip").fadeOut(100);
		});

	  } 
 $(document).ready(function(){

	 $(".tablelink").click(function(){
		  $(".tip").fadeIn(200);
	 });
		  
	$(".tiptop a").click(function(){
		  $(".tip").fadeOut(200);
	});

	  
	  $("#addCar").click(function(){
	   location="insertCar";
	   });
	   
	}); */
 
</script>
<style type="text/css">
.seachform li label{line-height: 45px;color: #444444}
.scinput{line-height: 10px;margin-top: 5px}
.scinput1{margin-top: 5px;height: 30px;}
.scbtn{background: #57a0ff;border-radius:20px;width: 110px;margin-top: 4px;height: 35px}
.scbtn2{height: 20px;background: #57a0ff;border-radius:20px;width: 50px;color: #fff;display: none;}

.tablelist th{background: none;border-bottom: none;}
thead {background: #f2f2f2}
tbody tr:nth-child(even) {background: #f7f8fd}
.tablelist th{height: 45px;padding-left: 30px}
.tablelist td{border-right:none;padding-left: 30px}
tbody tr{height: 38px}
.check{padding-left: 0px}
a{cursor: pointer;}

</style>
</head>
<body style="background: #f5f5f5;padding: 0 10px;">
<div id="location_top">
		<div class="place" style="background: #f5f5f5;margin-top: 10px">
			<ul class="placeul">
				<li><a href="#">学员管理</a></li>
				<li><a href="#">退学申请</a></li>
			</ul>
		</div>
	
		<div class="rightinfo" style="background: #fff;border-radius:10px;height: 45px;">

			<form action="<%=path%>/DrivingSys/selExitClazzByCon" method="post">
				<ul class="seachform">

					    <li><label>学员名称</label><input name="studentName" type="text" class="scinput" value="${exitClazz1.studentName}"/></li>
					    <li><label>身份证号码</label><input name="cfidcardno" type="text" class="scinput" value="${exitClazz1.cfidcardno}"/></li>
					    <li><label>单据编号</label><input name="fnumber" type="text" class="scinput" value="${exitClazz1.fnumber}"/></li>
					    <li><label>业务开始时间</label><input class="scinput1"  name="beginTime" type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd'})" 
					    id="datemin" class="input-text Wdate" style="width:150px;" value="${beginTime}"></li>
						<li><label>业务结束时间</label><input class="scinput1"  name="endTime" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',dateFmt:'yyyy-MM-dd'})"
						id="datemax" class="input-text Wdate" style="width:150px;"value="${endTime}"></li>		
						<li><label>&nbsp;</label><input name="" type="submit"  style="outline: none;" class="scbtn" value="立即查询" /></li>
				</ul>
			</form>
		</div>
</div>
<div id="data_table_new"
	 style="margin-bottom: 0px;margin-top: 30px;background: #fff;border-radius:10px;box-shadow: 0 0 10px #f2f2f2;">
			<ul>
				 <li style="height: 40px;text-align: left;color: #999999;">
				  <span style="font-size: 12px;">
                  <shiro:hasPermission name="/addExitClazz">
				  <img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;" src="<%=path%>/images/list/xz.png">
				       &nbsp;<a onclick="gotoSelectCard(this)" funurl="<%=path%>/DrivingSys/addExitClazz">新增</a>
                  </shiro:hasPermission>
                  <shiro:hasPermission name="/delExitClazzById">
				  <img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;" src="<%=path%>/images/list/sc.png">
				       &nbsp;<a class="del">删除</a>
                  </shiro:hasPermission>
                  <shiro:hasPermission name="/selExitClazzById">
				  <img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;" src="<%=path%>/images/list/xg.png">
				       &nbsp;<a class="update">修改</a>
                  </shiro:hasPermission>
					  <shiro:hasPermission name="/outExitClazzExcel">
					  <img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;width: 14px" src="<%=path%>/images/list/excel.png">
					 &nbsp;<a class="outExcel">导出Excle</a>
					  </shiro:hasPermission>
					  <shiro:hasPermission name="/outChangeClazzExcel">
						  <img alt="" style="margin-top: 20px;margin-left: 22px;height: 12px;width: 14px" src="<%=path%>/images/list/process.jpg">
						  &nbsp;<a class="checkProcess">查看流程图</a>
					  </shiro:hasPermission>
				  </span>
				 </li>
			</ul>
		<table id="content" class="tablelist" style="white-space:nowrap;">
			<thead>
				<tr style="position: static;">
					<th><input type="checkbox" class="check"  /></th>
					<th>序号</th>
					<th>单据编号</th>
					<th>业务日期</th>
					<th>退学原因</th>
					<th>审核人名称</th>
					<th>审核时间</th>
					<th>制单人名称</th>
					<th>学员编码</th>
					<th>学员</th>
					<th>身份证号码</th>
					<th>车型</th>
					<th>推荐人</th>
					<th>推荐人部门</th>
					<th>报名时间</th>
					<th>单据状态</th>
					<th>规费状态</th>
					<th>科目一</th>
					<th>科目二</th>
					<th>计时卡</th>
					<th>合计共扣</th>
					<th>应退金额</th>
					<th>扣款项目</th>
					<th>金额</th>
					<th>约排考系统</th>
					<th>培训费</th>
					<th>规费</th>
					<th>班级</th>
					<th>应收金额</th>
					<th>已收金额</th>
					<th>优惠金额</th>
					<th>欠费金额</th>
					<th>刷卡金额</th>
					<th>操作</th>
				</tr>
			</thead>
			<c:forEach items="${exitClazzs}" var="exitClazz" varStatus="s">
				<tbody>
				<tr class="exitClazz" id="${exitClazz.fnumber}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc"><input type="checkbox"  value="${exitClazz.fid}" name="check"/></td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${s.index+1}</td>
					<td class="fnumber" style="border-bottom: 1px solid #cccccc" rowspan="7">${exitClazz.fnumber}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.fbizdate}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.fdescription}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.fauditorName}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.cfaudittime}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.fhandlerName}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.studentnumber}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.studentName}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.cfidcardno}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.studentcfslzjcxdh}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.cftjr}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.cfdepartment}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">${exitClazz.cfbmsj}</td>
					<c:if test="${exitClazz.cfbillstate eq 5}">
						<td rowspan="7" style="border-bottom: 1px solid #cccccc">审核</td>
					</c:if>
					<c:if test="${exitClazz.cfbillstate eq 4}">
						<td rowspan="7" style="border-bottom: 1px solid #cccccc">提交</td>
					</c:if>
					<c:if test="${exitClazz.cfbillstate eq 3}">
						<td rowspan="7" style="border-bottom: 1px solid #cccccc">保存</td>
					</c:if>
					<c:if test="${exitClazz.cfguifei eq 1}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">已付</td>
					</c:if>
					<c:if test="${exitClazz.cfguifei eq 2}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">未付</td>
					</c:if>
					<c:if test="${exitClazz.cfguifei eq 3}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">已抵规费</td>
					</c:if>
					<c:if test="${exitClazz.cfguifei ne 3 && exitClazz.cfguifei ne 2 && exitClazz.cfguifei ne 1}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc"></td>
					</c:if>
					<c:if test="${exitClazz.cfkmy eq 1}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">及格</td>
					</c:if>
					<c:if test="${exitClazz.cfkmy eq 2}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">未考</td>
					</c:if>
					<c:if test="${exitClazz.cfkmy eq 3}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">不及格</td>
					</c:if>
					<c:if test="${exitClazz.cfkmy eq 4}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">未到</td>
					</c:if>
					<c:if test="${exitClazz.cfkmy ne 3 && exitClazz.cfkmy ne 2 && exitClazz.cfkmy ne 1 && exitClazz.cfkmy ne 4}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc"></td>
					</c:if>

					<c:if test="${exitClazz.cfkme eq 1}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">及格</td>
					</c:if>
					<c:if test="${exitClazz.cfkme eq 2}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">未考</td>
					</c:if>
					<c:if test="${exitClazz.cfkme eq 3}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">不及格</td>
					</c:if>
					<c:if test="${exitClazz.cfkme eq 4}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">未到</td>
					</c:if>
					<c:if test="${exitClazz.cfkme ne 3 && exitClazz.cfkme ne 2 && exitClazz.cfkme ne 1 && exitClazz.cfkme ne 4}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc"></td>
					</c:if>

					<c:if test="${exitClazz.cfjsk eq 1}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">已发放</td>
					</c:if>
					<c:if test="${exitClazz.cfjsk eq 2}">
					<td rowspan="7"style="border-bottom: 1px solid #cccccc">未发放</td>
					</c:if>
					<c:if test="${exitClazz.cfjsk ne 2 && exitClazz.cfjsk ne 1}">
					<td rowspan="7" style="border-bottom: 1px solid #cccccc"></td>
					</c:if>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc" class="total_cfhjgk">${exitClazz.cfhjgk}</td>
					<td rowspan="7" class="detail" style="border-bottom: 1px solid #cccccc">${exitClazz.cfyt}</td>

					<td class="item${exitClazz.fnumber}0"></td>
					<td class="count${exitClazz.fnumber}0   money"></td>
					<c:if test="${exitClazz.cfypkxt eq 1}">
					<td>已录</td>
					</c:if>
					<c:if test="${exitClazz.cfypkxt ne 1 }">
					<td>未录</td>
					</c:if>
					<td class="total_cfpxf">${exitClazz.cfpxf}</td>
					<td class="total_cfgf">${exitClazz.cfgf}</td>
					<td>${exitClazz.cfclazz}</td>
					<td class="total_cfyinshou">${exitClazz.cfyinshou}</td>
					<td class="total_cfyishou">${exitClazz.cfyishou}</td>
					<td class="total_cfyouhui">${exitClazz.cfyouhui}</td>
					<td class="total_cfqianfei">${exitClazz.cfqianfei}</td>
					<td class="total_cfshuaka">${exitClazz.cfshuaka}</td>
					<td rowspan="7" style="border-bottom: 1px solid #cccccc">
					   <img alt="" height="11px" src="<%=path%>/images/list/xg.png">
						<a href="<%=path%>/DrivingSys/selExitClazzById?fid=${exitClazz.fid}" class="tablelink">查看</a>&nbsp;&nbsp;&nbsp;
						&nbsp;&nbsp;&nbsp;<img alt="" height="11px" src="<%=path%>/images/list/sc.png">
						<a onclick="delStudent('${exitClazz.fid}',this)" class="tablelink">删除</a>&nbsp;&nbsp;&nbsp;
				    </td>
				</tr>
				<tr >

					<td class="item${exitClazz.fnumber}1"></td>
					<td class="count${exitClazz.fnumber}1   money"></td>
					<c:if test="${exitClazz.cfypkxt ne 1}">
					<td>未录</td>
					</c:if>
					<c:if test="${exitClazz.cfypkxt eq 1}">
					<td>已录</td>
					</c:if>
					<td class="total_cfpxf">${exitClazz.cfpxf}</td>
					<td class="total_cfgf">${exitClazz.cfgf}</td>
					<td>${exitClazz.cfclazz}</td>
					<td class="total_cfyinshou">${exitClazz.cfyinshou}</td>
					<td class="total_cfyishou">${exitClazz.cfyishou}</td>
					<td class="total_cfyouhui">${exitClazz.cfyouhui}</td>
					<td class="total_cfqianfei">${exitClazz.cfqianfei}</td>
					<td class="total_cfshuaka">${exitClazz.cfshuaka}</td>
				</tr>
				<tr >					
					<td class="item${exitClazz.fnumber}2"></td>
					<td class="count${exitClazz.fnumber}2   money"></td>
					<c:if test="${exitClazz.cfypkxt ne 1}">
					<td>未录</td>
					</c:if>
					<c:if test="${exitClazz.cfypkxt eq 1}">
					<td>已录</td>
					</c:if>
					<td class="total_cfpxf">${exitClazz.cfpxf}</td>
					<td class="total_cfgf">${exitClazz.cfgf}</td>
					<td>${exitClazz.cfclazz}</td>
					<td class="total_cfyinshou">${exitClazz.cfyinshou}</td>
					<td class="total_cfyishou">${exitClazz.cfyishou}</td>
					<td class="total_cfyouhui">${exitClazz.cfyouhui}</td>
					<td class="total_cfqianfei">${exitClazz.cfqianfei}</td>
					<td class="total_cfshuaka">${exitClazz.cfshuaka}</td>
				</tr>
				<tr >
					<td class="item${exitClazz.fnumber}3"></td>
					<td class="count${exitClazz.fnumber}3   money"></td>
					<c:if test="${exitClazz.cfypkxt ne 1}">
					<td>未录</td>
					</c:if>
					<c:if test="${exitClazz.cfypkxt eq 1}">
					<td>已录</td>
					</c:if>
					<td class="total_cfpxf">${exitClazz.cfpxf}</td>
					<td class="total_cfgf">${exitClazz.cfgf}</td>
					<td>${exitClazz.cfclazz}</td>
					<td class="total_cfyinshou">${exitClazz.cfyinshou}</td>
					<td class="total_cfyishou">${exitClazz.cfyishou}</td>
					<td class="total_cfyouhui">${exitClazz.cfyouhui}</td>
					<td class="total_cfqianfei">${exitClazz.cfqianfei}</td>
					<td class="total_cfshuaka">${exitClazz.cfshuaka}</td>
				</tr>
				<tr >
					<td class="item${exitClazz.fnumber}4"></td>
					<td class="count${exitClazz.fnumber}4   money"></td>
					<c:if test="${exitClazz.cfypkxt ne 1}">
					<td >未录</td>
					</c:if>
					<c:if test="${exitClazz.cfypkxt eq 1}">
					<td >已录</td>
					</c:if>
					<td class="total_cfpxf">${exitClazz.cfpxf}</td>
					<td class="total_cfgf">${exitClazz.cfgf}</td>
					<td>${exitClazz.cfclazz}</td>
					<td class="total_cfyinshou">${exitClazz.cfyinshou}</td>
					<td class="total_cfyishou">${exitClazz.cfyishou}</td>
					<td class="total_cfyouhui">${exitClazz.cfyouhui}</td>
					<td class="total_cfqianfei">${exitClazz.cfqianfei}</td>
					<td class="total_cfshuaka">${exitClazz.cfshuaka}</td>
				</tr>
				<tr >
				<td class="item${exitClazz.fnumber}5"></td>
					<td class="count${exitClazz.fnumber}5   money"></td>
					<c:if test="${exitClazz.cfypkxt ne 1}">
					<td >未录</td>
					</c:if>
					<c:if test="${exitClazz.cfypkxt eq 1}">
					<td >已录</td>
					</c:if>
					<td class="total_cfpxf">${exitClazz.cfpxf}</td>
					<td class="total_cfgf">${exitClazz.cfgf}</td>
					<td>${exitClazz.cfclazz}</td>
					<td class="total_cfyinshou">${exitClazz.cfyinshou}</td>
					<td class="total_cfyishou">${exitClazz.cfyishou}</td>
					<td class="total_cfyouhui">${exitClazz.cfyouhui}</td>
					<td class="total_cfqianfei">${exitClazz.cfqianfei}</td>
					<td class="total_cfshuaka">${exitClazz.cfshuaka}</td>
				</tr>
				<tr >
					<td class="item${exitClazz.fnumber}6"></td>
					<td class="count${exitClazz.fnumber}6   money"></td>
					<c:if test="${exitClazz.cfypkxt ne 1}">
					<td>未录</td>
					</c:if>
					<c:if test="${exitClazz.cfypkxt eq 1}">
					<td>已录</td>
					</c:if>
					<td class="total_cfpxf">${exitClazz.cfpxf}</td>
					<td class="total_cfgf">${exitClazz.cfgf}</td>
					<td>${exitClazz.cfclazz}</td>
					<td class="total_cfyinshou">${exitClazz.cfyinshou}</td>
					<td class="total_cfyishou">${exitClazz.cfyishou}</td>
					<td class="total_cfyouhui">${exitClazz.cfyouhui}</td>
					<td class="total_cfqianfei">${exitClazz.cfqianfei}</td>
					<td class="total_cfshuaka">${exitClazz.cfshuaka}</td>
				</tr>
				</tbody>
			</c:forEach>
			<%--		rhc  信息总条数--%>
			<tr class="sq">
				<td>合计:</td>
				<td>${messageAmount}</td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>

				<td id="total_cfhjgk">0</td>
				<td id="detail">0</td>
				<td ></td>

				<td id="money">0</td>

				<td></td>

				<td id="total_cfpxf">0</td>
				<td id="total_cfgf">0</td>
				<td></td>
				<td id="total_cfyinshou">0</td>
				<td id="total_cfyishou">0</td>
				<td id="total_cfyouhui">0</td>
				<td id="total_cfqianfei">0</td>
				<td id="total_cfshuaka">0</td>
				<td></td>
			</tr>
		</table>

		</div>
<div id="location_bottom">
		<pg:pager items="${pb.tr}" url="${pb.url}" export="offset,currentPageNumber=pageNumber" maxPageItems="${pb.ps}">  
			   <pg:param name="studentName" value="${exitClazz1.studentName}"/>
    		   <pg:param name="fnumber" value="${exitClazz1.fnumber}"/>
    		   <pg:param name="cfidcardno" value="${exitClazz1.cfidcardno}"/>
    		   <pg:param name="beginTime" value="${beginTime}"/> 
    		   <pg:param name="endTime" value="${endTime}"/>   
            <pg:index>  
               <pg:first>
               <a href="${pageUrl}&&type=${type}" >
               <nobr>
               [首页]
               </nobr>
              </a>   
               </pg:first>  
               <pg:prev><a href="${pageUrl}&&type=${type}">前一页</a></pg:prev>  
               <pg:pages>  
                     <c:choose>  
                        <c:when test="${currentPageNumber eq pageNumber}">    
                           <font color="red">${pageNumber }</font>  
                        </c:when>    
                        <c:otherwise>    
                           <a href="${pageUrl}&&type=${type}">${pageNumber}</a>   
                        </c:otherwise>    
                     </c:choose>  
               </pg:pages>  
               <pg:next><a href="${pageUrl}&&type=${type}">下一页</a></pg:next>  
               <pg:last><a href="${pageUrl}&&type=${type}"><nobr>[尾页]</nobr></a></pg:last>  
            </pg:index>      
         </pg:pager>
</div>


<div class="tip">
	<div class="tiptop">
		<span>提示信息</span>
	</div>
	<div class="tipinfo">
		<span><img src="<%=path%>/images/ticon.png" /></span>
		<div class="tipright">
			<p>是否确认对信息删除 ？</p>
			<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
		</div>
	</div>
	<div class="tipbtn">
		<input name="" type="button" class="sure" value="确定" />&nbsp; <input
			name="" type="button" class="cancel" value="取消" />
	</div>
</div>


</body>
<script type="text/javascript" src="<%=path%>/JS/tempJs/tool.js"></script>
<script type="text/javascript">

    // $(function () {
    //     $(".tip").css("left",$(".tablelist").width()-1000)
    // })


	$(document).ready(function(){
        fixation_List()
        var type = "${type}";
        if (type == '0' || type == '' || type == null) {

        } else {
            //alert("添加成功");
            editAlert();
        }


        function mwEvent(event)
		{
		    if(event.wheelDelta<=0 || event.detail>0)
		        this.scrollTop += 5;
		    else
		        this.scrollTop -= 5;
		}

       /* $('input:checkbox:not(":first")').each(function(i){
            if($(this).parent().parent().find('td:nth-child(11)').html() == '审核' || $(this).parent().parent().find('td:nth-child(11)').html() == '提交' ) {
                $(this).attr('disabled', true)
            }
        })*/

		$('.exitClazz').each(function(i){
		 var fid=$(this).find('input[type=checkbox]').val()
		 var obj=$(this)
		 var fnumber=$(this).find('.fnumber').html()
		 $.ajax({
			    url:'<%=path%>/DrivingSys/selExitClazzEntry', 
			    type: "post",
			    data:{'fid':fid},
			    dataType:"json",         	
			    success: function(json) {
			        if(json == ""){
                        	obj.nextAll().each(function () {
                            $(this).remove()
                        })
					} else {
                        for (var i = 0; i < json.length; i++) {
                            obj.parent().find(".item" + fnumber + i).text(json[i].cfkkxmName)
                            if (json[i].cfamount == null) {
                                obj.parent().find(".count" + fnumber + i).text("")
                            } else {
                                obj.parent().find(".count" + fnumber + i).text(json[i].cfamount)
                            }
                        }
                        obj.nextAll().each(function () {
                            if ($(this).find('td:eq(0)').html() == '')
                                $(this).hide()
                        })
                    }
                    //初始化合计
                    $(function () {
                        $('#total_cfhjgk').text(class_sum('.total_cfhjgk'));
                        $('#detail').text(class_sum('.detail'));
                        $('#money').text(class_sum('.money'));
                        $('#total_cfpxf').text(class_sum('.total_cfpxf'));
                        $('#total_cfgf').text(class_sum('.total_cfgf'));
                        $('#total_cfyinshou').text(class_sum('.total_cfyinshou'));
                        $('#total_cfyishou').text(class_sum('.total_cfyishou'));
                        $('#total_cfyouhui').text(class_sum('.total_cfyouhui'));
                        $('#total_cfqianfei').text(class_sum('.total_cfqianfei'));
                        $('#total_cfshuaka').text(class_sum('.total_cfshuaka'));

                    });
				},  
				error: function(){alert('Error');} 
	 			});

		})
		
		$('.del').click(function(){
            var spCodesTemp = "";
            var flag = 0
            $('[name=check]:checked').each(function(i){
                if($(this).parent().parent().find('td:nth-child(11)').html() == '审核' || $(this).parent().parent().find('td:nth-child(11)').html() == '提交' ){
                    flag=1
                    $(this).attr('checked',false)
                }else {
                    if(0==i){
                        spCodesTemp = $(this).val();
                    }else{
                        spCodesTemp += (","+$(this).val());
                    }
                }
            });

            if(flag == 1){
                alert("提交或审核状态不能被删除")
            }else if(spCodesTemp==""){
                alert("请选择单据")
            }else{
                $(".tip").fadeIn(100);
                $(".sure").click(function(){
                    location.href='<%=path%>/DrivingSys/delExitClazzById?fid='+spCodesTemp
                    $(".tip").fadeOut(100);
                })
            }

            $(".cancel").click(function(){
                $(".tip").fadeOut(100);
            });
			
		})
		
		$('.exitClazz').live('dblclick',function(){
		 var fid=$(this).find('input:checkbox').val()	 
		 fid=fid.replace(/\+/g,"%2B");
            gotoSelectCard(this,'/DrivingSys/selExitClazzById?fid='+fid);

            //location.href='<%=path%>/DrivingSys/selExitClazzById?fid='+fid
		})


        $(".checkProcess").live('click',function(){
            var spCodesTemp = "";
            $('[name=check]:checked').each(function(i){
                if(0==i){
                    spCodesTemp = $(this).parent().next().next().text();
                }else{
                    spCodesTemp += (","+$(this).parent().next().next().text());
                }
            });
            if(spCodesTemp==""){
                alert("请选择单据")
            }else{
                var fnumber=spCodesTemp.split(",")[0]
                fnumber=fnumber.replace(/\+/g,"%2B");
                lookActivitiImg('${ActivitiKey}',fnumber)
            }

        })

		$('.update').click(function(){
			var spCodesTemp = "";
            $('[name=check]:checked').each(function(i){
		       if(0==i){
		        spCodesTemp = $(this).val();
		       }else{
		        spCodesTemp += (","+$(this).val());
		       }
		      });  	
		      if(spCodesTemp==""){
		    	  alert("请选择学员")
		      }else{
		      var fid=spCodesTemp.split(",")[0]
		      		fid=fid.replace(/\+/g,"%2B");
		      location.href='<%=path%>/DrivingSys/selExitClazzById?fid='+fid
		      }
		})
		

        /* 全选功选 */
        $('.check').click(function(){
            if($(this).attr("checked")){
                $('input:checkbox:not(":first")').each(function() {
                    if(typeof($(this).attr('disabled')) == 'undefined'){
                        $(this).prop("checked", true)
                    }
                })
            }else{
                $('input:checkbox').removeAttr('checked')
            }
        })
			

			
			
			})
			



    function delStudent(deleteId,_this){
        var $this = $(_this)
        if($this.parent().parent().find('td:nth-child(11)').html() == '审核' || $this.parent().parent().find('td:nth-child(11)').html() == '提交'){
            alert($this.parent().parent().find('td:nth-child(11)').html()+'状态不能删除')
            return false
        } else {
            $(".tip").animate(({top: $(window).scrollTop()+250}))
            $(".tip").fadeIn(200);
            $('.window-mask').fadeToggle()
            $(".sure").click(function () {
                $(".tip").fadeOut(100);
                $('.window-mask').fadeOut()
                location='<%=path%>/DrivingSys/delExitClazzById?fid='+deleteId+'';

            })
        }
        $(".cancel").click(function(){
            $('.window-mask').fadeToggle()
            $(".tip").fadeOut(100);
        });

    }

    $('.outExcel').live('click',function () {
        var studentName = $('.seachform').find('input[name=studentName]').val()
        var fnumber = $('.seachform').find('input[name=fnumber]').val()
        var cfidcardno = $('.seachform').find('input[name=cfidcardno]').val()
        var beginTime = $('.seachform').find('input[name=beginTime]').val()
        var endTime = $('.seachform').find('input[name=endTime]').val()
        location = '<%=path%>/DrivingSys/outExitClazzExcel?studentName='+ studentName + '&cfidcardno=' + cfidcardno + '&fnumber=' + fnumber + '&beginTime=' + beginTime + '&endTime=' + endTime
    })

</script>
</html>